<?php
	session_start();
	include ("../include/config.php");	
	$account = $_POST["account"];
	$password = $_POST["password"];
	
	$str = "SELECT * FROM tbl_admin WHERE username='$account'";
	
	$r = mysql_query("$str") or die("Invalid query: " . mysql_error());
	
	$row = mysql_fetch_array($r);
	if ($row["password"]!=$password){
		$redirect = "index.php";
	}else{
		$redirect = "hotel.php";
		$_SESSION["adminId"]=$row["reg_id"];
		$_SESSION["admin"]=$row["username"];
	}
	
		
?>
<html><head><meta http-equiv="refresh" content="1;url=<?php echo $redirect;?>">
<title>Redirect</title></head>
<body bgcolor="#000000">
<br><br><br>

<center><img src="icon/processing.gif"/><font color=#ffffff face=arial size=3><b>The system is processing .....</font>
</center>
</body></html>